﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.ComponentModel.DataAnnotations;
using System.Web.Mvc;

namespace ABCTile.Models
{
    public class EstimateDetail
    {
        [Required(ErrorMessage = "Estimate ID is required")]
        [Display(Name = "Estimate ID")]
        public int Id { get; set; }
        [Required(ErrorMessage = "Estimate Id is required")]
        public int EstimateId { get; set; }

        [Required(ErrorMessage = "Section is required")]
        public string Section{ get; set; }
        [Required(ErrorMessage = "Product is required")]
        public string Product { get; set; }

        [Required(ErrorMessage = "Quantity is required")]
        public int Quantity { get; set; }
        [Required(ErrorMessage = "Price is required")]
        [Range(0.01, 100.00,
            ErrorMessage = "Price must be between 0.01 and 100.00")]
        public decimal PricePerQty { get; set; }

        [Required(ErrorMessage = "Experation Date is required")]
        public DateTime PriceExperationDate { get; set; }
        public string VendorName { get; set; }
    }
}